package org.example.viteVantDemo.constants;

/*
 * 接口返回码
 *
 * @author tnar
 *
 */
public enum ApiCodeEnum {

    SUCCESS(200, "SUCCESS"), //请求成功

    CUSTOM_FAIL(9999, "自定义业务异常"),  //自定义业务异常

    SYSTEM_ERROR(10, "系统异常[%s]"),
    PARAMS_ERROR(11, "参数有误[%s]"),
    DB_ERROR(12, "数据库服务异常"),
    DB_RECORD_ERROR(13, "记录不存在"),

    DB_RECORD_EXIST_ERROR(13, "该用户有交易记录，不能删除"),

    SYS_PERMISSION_ERROR(5004, "权限错误，当前用户不支持此操作");


    private int code;

    private String msg;

    ApiCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }
}
